<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增起名用字')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-namingzi-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">字：</label>
                <div class="col-sm-8">
                    <input name="zi" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">命名笔划：</label>
                <div class="col-sm-8">
                    <input name="bihua" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">吉区：</label>
                <div class="col-sm-8">
                    <input name="jixiong" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">五行：</label>
                <div class="col-sm-8">
                    <select name="wuxing" class="form-control m-b" th:with="type=${@dict.getType('naming_wuxing')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">繁体：</label>
                <div class="col-sm-8">
                    <input name="fanti" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">拼音：</label>
                <div class="col-sm-8">
                    <input name="pinyin" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">寓意：</label>
                <div class="col-sm-8">
                    <textarea name="jieshi" class="form-control" rows="5"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "naming/namingzi"
        $("#form-namingzi-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-namingzi-add').serialize());
            }
        }
    </script>
</body>
</html>